// [[ OnflowGenerator Entity UUID: 660c1a128dba4008bf239bc879ee5248 ]]
package com.itdct.onflow.system.monitor.entity

import com.baomidou.mybatisplus.annotation.TableName
import com.itdct.onflow.core.annotation.Column
import com.itdct.onflow.core.annotation.ColumnRelateId
import com.itdct.onflow.core.annotation.TableDescription
import com.itdct.onflow.core.entity.IdEntity
import java.math.BigDecimal

/**
 * @author Zhouwx
 * @date 2025/10/16 9:16:39
 * @version 1.0
 * @description
 */
@TableDescription("服务器监控数据上报")
@TableName("sys_machine_report")
class SysMachineReportEntity : IdEntity() {
    @ColumnRelateId(targetClass = SysMachineInfoEntity::class, targetFieldName = "machineId")
    @Column(comment = "服务器信息Id", nullable = false, indexed = true, sort = 10)
    var infoId = 0L

    @Column(comment = "服务器id", nullable = false, indexed = true, length = 50, sort = 20)
    var machineId = ""

    @Column(comment = "CPU使用率", nullable = false, length = 8, decimal = 2, sort = 30)
    var cpuUsage = BigDecimal(0)

    @Column(comment = "CPU频率", nullable = false, length = 8, decimal = 2, sort = 40)
    var cpuFreq = BigDecimal(0)

    @Column(comment = "内存使用率", nullable = false, length = 8, decimal = 2, sort = 50)
    var memoryUsage = BigDecimal(0)

    @Column(comment = "物理内存使用量", nullable = false, defaultValue = "0", sort = 60)
    var physicalMemoryInUse = 0L

    @Column(comment = "物理内存总量", nullable = false, defaultValue = "0", sort = 70)
    var physicalMemoryTotal = 0L

    @Column(comment = "虚拟内存使用量", nullable = false, defaultValue = "0", sort = 80)
    var virtualMemoryInUse = 0L

    @Column(comment = "虚拟内存总量", nullable = false, defaultValue = "0", sort = 90)
    var virtualMemoryTotal = 0L

    @Column(comment = "存储使用率", nullable = false, length = 8, decimal = 2, sort = 100)
    var storageUsage = BigDecimal(0)

    @Column(comment = "存储总量", nullable = false, defaultValue = "0", sort = 110)
    var storageTotal = 0L

    @Column(comment = "存储使用量", nullable = false, defaultValue = "0", sort = 120)
    var storageInUse = 0L

    @Column(comment = "磁盘写入", nullable = false, defaultValue = "0", sort = 130)
    var diskWrite = 0L

    @Column(comment = "磁盘读取", nullable = false, defaultValue = "0", sort = 140)
    var diskRead = 0L

    @Column(comment = "网络下载", nullable = false, defaultValue = "0", sort = 150)
    var networkDownload = 0L

    @Column(comment = "网络上传", nullable = false, defaultValue = "0", sort = 160)
    var networkUpload = 0L

    @Column(comment = "JVM内存使用率", nullable = false, length = 8, decimal = 2, sort = 170)
    var jvmMemoryUsage = BigDecimal(0)

    @Column(comment = "JVM内存总量", nullable = false, defaultValue = "0", sort = 180)
    var jvmMemoryTotal = 0L

    @Column(comment = "JVM内存使用量", nullable = false, defaultValue = "0", sort = 190)
    var jvmMemoryInUse = 0L

}